import request from '@/utils/request'

export class dsAgreementApi {

    static getPageList(params) {
        return request({
            url: '/ds/agreement/list',
            method: 'get',
            params: params
        })
    }

    //#- 添加
    static add(data) {
        return request({
            url: '/ds/agreement/add',
            method: 'post',
            data: data
        })
    }
    static getInfoById(id) {
        return request({
            url: `/ds/agreement/${id}`,
            method: 'get'
        })
    }

    static edit(data) {
        return request({
            url: '/ds/agreement/edit',
            method: 'put',
            data: data
        })
    }
    static remove(ids) {
        return request({
            url: `/ds/agreement/bathRemove/${ids}`,
            method: 'delete',
        })
    }


    /**
     * 查询调用记录
     */
    static getCallRecordPageList(url,params) {
        return request({
            url: `${url}`,
            method: 'get',
            params: params
        })
    }
    static deleteRecord(url,ids) {
        return request({
            url: `${url}/${ids}`,
            method: 'delete',
        })
    }
    /**
     * 获取serviceCode redis 状态列表
     */
    static getServiceCodeCatchList(params) {
        return request({
            url: `/ds/agreement/serviceCode/catch/list`,
            method: 'get',
            params: params
        })
    }

    static saveServiceCode(data) {
        return request({
            url: '/ds/agreement/save/serviceCode/catch',
            method: 'post',
            data: data
        })
    }

    static getThreadLock() {
        return request({
            url: '/ds/agreement/get/thread/unlock',
            method: 'get'
        })
    }
    static saveThreadLock(params) {
        return request({
            url: '/ds/agreement/save/thread/unlock',
            method: 'get',
            params: params
        })
    }

}